#coding=utf-8
'''
Created on 2016年3月3日
'''
import zmq
import time
__author__ = 'chenjian'

if __name__ == '__main__':
    context   = zmq.Context()
    publisher = context.socket(zmq.PUB)
    publisher.connect("tcp://localhost:5563")

    while True:
        # Write two messages, each with an envelope and content
        publisher.send_multipart([b"A", b"We don't want to see this"])
        publisher.send_multipart([b"B", b"We would like to see this"])
        time.sleep(1)